import * as mutats from '../mutation-list'

const state = {
  map: {},
  showlines: {}
}

const actions = {
  createMap ({commit}, map) {
    commit(mutats.CREATE_MAP, map)
  },
  createShowLine ({commit}, lines) {
    commit(mutats.CREATE_SHOWLINE, lines)
  }
}

const mutations = {
  [mutats.CREATE_MAP] (state, map) {
    state.map = map
  },
  [mutats.CREATE_SHOWLINE] (state, lines) {
    state.lines = lines
  }
}

export default {
  state,
  actions,
  mutations
}
